package Loganseabolt.weapons;

import Loganseabolt.LoganSeaboltModBase;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;

public class War_Sword extends ItemSword
{

	public War_Sword(int par1, EnumToolMaterial par2EnumToolMaterial) {
		super(par1, par2EnumToolMaterial);
		// TODO Auto-generated constructor stub
	}
	public void registerIcons(IconRegister iconReg)
    {
        itemIcon = iconReg.registerIcon("LoganSeaboltModBase:War's Sword");
    }
	public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
    {
		if(!par2EntityLiving.worldObj.isRemote)
		{
	        par1ItemStack.damageItem(15, par3EntityLiving);
	        /*
	        this.potionID = par1;
	        this.duration = par2;
	        this.amplifier = par3;
	        this.isAmbient = par4;
	        */
	        //if ((EntitySkeleton)par2EntityLiving  != null)
	        //{
	        //	par2EntityLiving.addPotionEffect(new PotionEffect(Potion.heal.id, 5000, 1, false));
	        //}
	        // if ((EntityZombie)par2EntityLiving != null)
	        //{
	        	//par2EntityLiving.addPotionEffect(new PotionEffect(Potion.heal.id, 5000, 1, false));
	        //}
	        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.confusion.id, 100, 1, false));
	        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 1, false));
	        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1, false));
	        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10, 1, false));
	        par2EntityLiving.setFire(100);
	        if (par2EntityLiving.isBurning())
	        {
				 par2EntityLiving.dropItem(LoganSeaboltModBase.Souls.itemID, 3);
	        }
		}
        return true;
    }
}
	
